package org.tuoren.system.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.tuoren.common.excel.annotation.ExcelDictFormat;
import org.tuoren.common.excel.convert.ExcelDictConvert;
import org.tuoren.system.domain.SysVisit;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;



/**
 * 访问记录视图对象 sys_visit
 *
 * @author Lion Li
 * @date 2025-03-19
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = SysVisit.class)
public class SysVisitVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 访问Id
     */
    @ExcelProperty(value = "访问Id")
    private Long visitId;

    /**
     * 模块标题
     */
    @ExcelProperty(value = "模块标题")
    private String title;

    /**
     * 操作类别（0其它 1后台用户 2手机端用户）
     */
    @ExcelProperty(value = "操作类别", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "0=其它,1=后台用户,2=手机端用户")
    private String visitType;

    /**
     * 页面URL
     */
    @ExcelProperty(value = "页面URL")
    private String visitUrl;

    /**
     * 主机地址
     */
    @ExcelProperty(value = "主机地址")
    private String visitIp;

    /**
     * 操作地点
     */
    @ExcelProperty(value = "操作地点")
    private String visitLocation;

    /**
     * 消耗时间
     */
    @ExcelProperty(value = "消耗时间")
    private Long costTime;

    /**
     * 操作时间
     */
    @ExcelProperty(value = "操作时间")
    private Date operTime;

    /**
     *  参数
     */
    @ExcelProperty(value = "参数")
    private String visitParam;
}
